#include "Interactive.h"
#include "IVisitor.h"

Interactive::Interactive(const StmtTypeList& body, int nodeId):
    modType(nodeId),
    _body(body)
{
}
    
Interactive::~Interactive()
{
    _body.clear();
}
    
QString Interactive::type() const
{
    return "Interactive";
}
    

StmtTypeList Interactive::body()
{
    return _body;
}

void Interactive::setBody(const StmtTypeList& body)
{
    _body = body;
}

    
QString Interactive::toString() const
{
    return QString("Interactive[body=%1]").
                arg(_body.toString());
}
    
void Interactive::accept(IVisitor* visitor, const SimpleNodePtr& node)
{
    visitor->visitInteractive(node.dynamicCast<Interactive>());
}
    
void Interactive::traverse(IVisitor* visitor)
{
    _body.traverse(visitor);
}